<admintpl file="header"/>
<body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
   <div class="nav">
    <ul class="cc">
      <li class="current"><a href="#">留言列表</a></li>
    </ul>
   </div>
   <div class="table_list">
   <table width="100%" cellspacing="0">
        <thead>
          <tr>
            <td>ID</td>
            <td>姓名</td>
<!--             <td>邮箱</td>
            <td>联系电话</td>
            <td>qq</td> -->
            <td>信息</td>
            <td>留言内容</td>
            <td>管理员回复</td>
            <td>留言时间</td>
            <td>状态</td>
            <td width="120">管理操作</td>
          </tr>
        </thead>
        <tbody>
        <foreach name="list" item="vo">
          <tr>
            <td width="30">{$vo.id}</td>
            <td width="50">{$vo.name}</td>
<!--             <td>{$vo.email}</td>
            <td>{$vo.phone}</td>
            <td>{$vo.qq}</td> -->
            <td width="180">
              邮箱：{$vo.email} <br>
              联系号码：{$vo.phone} <br>
              QQ：{$vo.qq} <br>
            </td>
            <td width="300">{$vo.content}</td>
            <td>{$vo.reply}</td>
            <td width="120">{$vo.create_time|date="Y-m-d H:i",###}</td>

            <td>
              <if condition="$vo['status'] == -1">
              <span style="color:red">未通过</span>
              <else />
              <span style="color:green">通过</span>
              </if>
            </td>
            <td width="120">
            <a href="{:U('Guestbook/edit',array('id'=>$vo['id']))}">回复</a>
            |
            <a href="javascript:void(0)" url="{:U('Guestbook/delete',array('id'=>$vo['id']))}" class="del_btn">删除</a>
            </td>
          </tr>
         </foreach>
        </tbody>
      </table>

      {$page}
   </div>
</div>
<script src="__ROOT__/statics/js/common.js{$js_debug}"></script>
<script>
$('.del_btn').click(function(event) {
  if(!confirm('确定要删除该账号吗？')){
    return false;
  }else{
    window.location.href = $(this).attr('url');
  }
});
</script>
</body>
</html>